<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        span{
            display: inline-block;
            width: 100px;
            height: 50px;
            background: #fff;
            border: 1px solid #ccc;
            line-height: 50px;
            text-align: center;
        }
        span:hover{
            background: pink;
        }
    </style>
</head>
<body>
    <h1>99乘法表</h1>
    <!-- <span></span> -->
    <div id="p">

    </div>
</body>
<script>
    var p = document.getElementById('p');
    var str = '';
    for(var i = 1;i <= 9;i++){
        for(var j = 1;j<=i;j++){
           str += '<span>' + i + '*' + j + '=' + i*j + '</span>' + ''; 
        }
        str =  str + '<br>';
        p.innerHTML = str;
    }
</script>
</html>